package com.mall.shopping.converter;

import com.mall.shopping.dal.entitys.ItemCat;
import com.mall.shopping.dto.CategoryDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.io.Serializable;
import java.util.List;

/**
 * @Author: lin
 * @Date: 2020/7/11 16:02
 */
@Mapper(componentModel = "spring")
public interface ItemCartConverter {

    @Mappings({
            @Mapping(source = "icon", target = "iconUrl")
    })
    public CategoryDto itemCartToCategory(ItemCat itemCat);

    public List<CategoryDto> itemCatToList(List<ItemCat> itemCats);

}
